{% extends 'base.html' %}
{% block content %}
<h2>单价配置 - {{ customer.username }}</h2>
<a href="/customer/{{ customer.id }}/price_config/create/" class="btn btn-primary">新增单价配置</a>
<table class="table">
    <thead>
        <tr>
            <th>资费包</th>
            <th>单价</th>
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
        {% for cfg in configs %}
        <tr>
            <td>{{ cfg.package }}</td>
            <td>{{ cfg.price }}</td>
            <td>
                <a href="/customer/{{ customer.id }}/price_config/{{ cfg.id }}/edit/" class="btn btn-sm btn-info">编辑</a>
                <a href="/customer/{{ customer.id }}/price_config/{{ cfg.id }}/delete/" class="btn btn-sm btn-danger" onclick="return confirm('确定要删除该配置吗？')">删除</a>
            </td>
        </tr>
        {% endfor %}
    </tbody>
</table>
<a href="/customer/" class="btn btn-secondary">返回客户列表</a>
{% endblock %}
